package com.qianniu.napi.admin.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author chenxuebin
 * @since 2018-07-07
 */
@TableName("t_coupon")
public class Coupon extends Model<Coupon> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 券模板id
     */
	private Long tplid;
	private Long gid;

	private String pic;
	private String xmtype;

    /**
     * 券名称
     */
	private String name;
	private String sn;
	/**
	 * 商家名称
	 */
	private String sname;
	private String address;

	private String remark;

	private String cno;
    /**
     * 有效开始时间
     */
	private String starttime;

    /**
     * 券结束时间
     */
	private String endtime;

    /**
     * 抵扣金额
     */
	private BigDecimal cost;
	private BigDecimal usemin;

    /**
     * 是否使用@1：是；0：否
     */
	@TableField("is_used")
	private Integer isUsed;

	/**
	 * 是否未使用@1：是；0：否
	 */
	@TableField("is_unused")
	private Integer isUnused;

	/**
	 * 是否有效@1：是；-1：否
	 */
	private Integer state;

	private Integer type;

    /**
     * 是否过期@1：是；0：否
     */
	@TableField("is_outdate")
	private Integer isOutdate;

    /**
     * 是否永久性@1：是；0：否
     */
	@TableField("is_forever")
	private Integer isForever;

    /**
     * 领券来源
     */
	@TableField("origin_type")
	private Integer originType;

	private Long mid;
	private Long mpid;
	private Long sid;
	private Long oid;

	private Integer ismember;
	private Integer mlevel;

	private Long zfuid;
	private Long uid;
	private Long modifier;
	private Date createtime;
	private Date usetime;
	private Date modifytime;

	public String getCno() {
		return cno;
	}

	public void setCno(String cno) {
		this.cno = cno;
	}

	public Date getUsetime() {
		return usetime;
	}

	public void setUsetime(Date usetime) {
		this.usetime = usetime;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getTplid() {
		return tplid;
	}

	public void setTplid(Long tplid) {
		this.tplid = tplid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getStarttime() {
		return starttime;
	}

	public void setStarttime(String starttime) {
		this.starttime = starttime;
	}

	public String getEndtime() {
		return endtime;
	}

	public void setEndtime(String endtime) {
		this.endtime = endtime;
	}

	public Integer getOriginType() {
		return originType;
	}

	public void setOriginType(Integer originType) {
		this.originType = originType;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public BigDecimal getCost() {
		return cost;
	}

	public void setCost(BigDecimal cost) {
		this.cost = cost;
	}

	public BigDecimal getUsemin() {
		return usemin;
	}

	public void setUsemin(BigDecimal usemin) {
		this.usemin = usemin;
	}

	public Integer getIsUsed() {
		return isUsed;
	}

	public void setIsUsed(Integer isUsed) {
		this.isUsed = isUsed;
	}

	public Integer getIsUnused() {
		return isUnused;
	}

	public void setIsUnused(Integer isUnused) {
		this.isUnused = isUnused;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Integer getIsOutdate() {
		return isOutdate;
	}

	public void setIsOutdate(Integer isOutdate) {
		this.isOutdate = isOutdate;
	}

	public Integer getIsForever() {
		return isForever;
	}

	public void setIsForever(Integer isForever) {
		this.isForever = isForever;
	}

	public Long getMid() {
		return mid;
	}

	public void setMid(Long mid) {
		this.mid = mid;
	}

	public Long getUid() {
		return uid;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getModifytime() {
		return modifytime;
	}

	public void setModifytime(Date modifytime) {
		this.modifytime = modifytime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	public Long getModifier() {
		return modifier;
	}

	public void setModifier(Long modifier) {
		this.modifier = modifier;
	}

	public Long getMpid() {
		return mpid;
	}

	public void setMpid(Long mpid) {
		this.mpid = mpid;
	}

	public Long getSid() {
		return sid;
	}

	public void setSid(Long sid) {
		this.sid = sid;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	public Long getOid() {
		return oid;
	}

	public void setOid(Long oid) {
		this.oid = oid;
	}

	public String getSname() {
		return sname;
	}

	public void setSname(String sname) {
		this.sname = sname;
	}

	public Long getZfuid() {
		return zfuid;
	}

	public void setZfuid(Long zfuid) {
		this.zfuid = zfuid;
	}

	public Integer getIsmember() {
		return ismember;
	}

	public void setIsmember(Integer ismember) {
		this.ismember = ismember;
	}

	public Integer getMlevel() {
		return mlevel;
	}

	public void setMlevel(Integer mlevel) {
		this.mlevel = mlevel;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Long getGid() {
		return gid;
	}

	public void setGid(Long gid) {
		this.gid = gid;
	}

	public String getXmtype() {
		return xmtype;
	}

	public void setXmtype(String xmtype) {
		this.xmtype = xmtype;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Coupon{" +
			"id=" + id +
			", tplid=" + tplid +
			", name=" + name +
			", starttime=" + starttime +
			", endtime=" + endtime +
			", cost=" + cost +
			", mid=" + mid +
			", uid=" + uid +
			", createtime=" + createtime +
			", modifytime=" + modifytime +
			"}";
	}
}
